<script setup lang="ts">
import logoSrc from 'assets/images/logo.png'
import { ref, watch } from 'vue'
import { useRoute } from 'vue-router'

const rootKey = ref<number>(0)
const $route = useRoute()
watch(
  () => $route.query,
  newVal => {
    if (newVal.themeChange) {
      // 更新根节点的key, 以达到完全切换element-plus主题的效果
      rootKey.value++
    }
  }
)
</script>

<template>
  <div :key="rootKey" class="innerApp">
    <router-view></router-view>
  </div>
</template>

<style lang="scss" scoped>
.innerApp {
  height: 100%;
}
</style>
